package cn.edu.scau.cmi.wangzm.composite.consistent;

import java.util.Set;

public class ConsistentComposite extends ConsistentComponent {
       private String name;
       public String getName() {
    	   return name;
       }
       public void setName(String name) {
    	   this.name=name;
       }
	@Override
	public ConsistentComponent addChild(ConsistentComponent child) {
		this.children.add(child);
		return this;
	}
	@Override
	public ConsistentComponent deleteChild(ConsistentComponent child) {
		children.remove(child);
		return this;
	}
	@Override
	public Set<ConsistentComponent> getChildren() {
		// TODO Auto-generated method stub
		return children;
	}
	@Override
	public String Run() {
		System.out.println("一致性组件");
		return null;
	}
	@Override
	public ConsistentComponent getParent() {
		// TODO Auto-generated method stub
		return this.getParent();
	}
}
